<?php

class Wiki_Dashboard_Controller extends Base_Controller {

    public function action_index() {
        $View = View::make("wiki::dashboard.index");

        $Entries = Entry::where('language_id', '=', Language::getActive())->take(5)->get();
        $View->latestEntries = $Entries;

        $Categories = Category::where('language_id', '=', Language::getActive())->where('parent_wiki_category_id', '=', 0)->order_by('category', 'ASC')->get();
        $View->categories = $Categories;

        $Tags = Tag::where('language_id', '=', Language::getActive())->get();
        $View->tags = $Tags;

        return $View;
    }

}